/**
 * Generate time : 2011-12-19 16:19:54
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import java.util.HashMap;
import java.util.Map;

import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEPointStandard table comment : 点检标准
 */
public class ZMCEPointStandard extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdStandredequipmentId = " "; /* 对应设备ID */
	private String fdStandardsForm = " "; /* 标准形式 */
	private Long fdSerial = new Long(0); /* 序号 */
	private String fdParts = " "; /* 点检部位 */
	private String fdCycletime = " "; /* 点检周期 */
	private String fdRequirements = " "; /* 点检要求 */
	private String fdNeedtime = " "; /* 点检需用时长 */
	private String fdType = " "; /* 点检类型 */
	private String fdRemarks = " "; /* 备注 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStandredequipmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("对应设备ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdStandardsForm");
		eiColumn.setFieldLength(1);
		eiColumn.setDescName("标准形式");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSerial");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("序号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdParts");
		eiColumn.setFieldLength(40);
		eiColumn.setDescName("点检部位");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCycletime");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("点检周期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRequirements");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("点检要求");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdNeedtime");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("点检需用时长");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdType");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("点检类型");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEPointStandard() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdStandredequipmentId - 对应设备ID
	 * 
	 * @return the fdStandredequipmentId
	 */
	public String getFdStandredequipmentId() {
		return this.fdStandredequipmentId;
	}

	/**
	 * set the fdStandredequipmentId - 对应设备ID
	 */
	public void setFdStandredequipmentId(String fdStandredequipmentId) {
		this.fdStandredequipmentId = fdStandredequipmentId;
	}

	/**
	 * get the fdStandardsForm - 标准形式
	 * 
	 * @return the fdStandardsForm
	 */
	public String getFdStandardsForm() {
		return this.fdStandardsForm;
	}

	/**
	 * set the fdStandardsForm - 标准形式
	 */
	public void setFdStandardsForm(String fdStandardsForm) {
		this.fdStandardsForm = fdStandardsForm;
	}

	/**
	 * get the fdSerial - 序号
	 * 
	 * @return the fdSerial
	 */
	public Long getFdSerial() {
		return this.fdSerial;
	}

	/**
	 * set the fdSerial - 序号
	 */
	public void setFdSerial(Long fdSerial) {
		this.fdSerial = fdSerial;
	}

	/**
	 * get the fdParts - 点检部位
	 * 
	 * @return the fdParts
	 */
	public String getFdParts() {
		return this.fdParts;
	}

	/**
	 * set the fdParts - 点检部位
	 */
	public void setFdParts(String fdParts) {
		this.fdParts = fdParts;
	}

	/**
	 * get the fdCycletime - 点检周期
	 * 
	 * @return the fdCycletime
	 */
	public String getFdCycletime() {
		return this.fdCycletime;
	}

	/**
	 * set the fdCycletime - 点检周期
	 */
	public void setFdCycletime(String fdCycletime) {
		this.fdCycletime = fdCycletime;
	}

	/**
	 * get the fdRequirements - 点检要求
	 * 
	 * @return the fdRequirements
	 */
	public String getFdRequirements() {
		return this.fdRequirements;
	}

	/**
	 * set the fdRequirements - 点检要求
	 */
	public void setFdRequirements(String fdRequirements) {
		this.fdRequirements = fdRequirements;
	}

	/**
	 * get the fdNeedtime - 点检需用时长
	 * 
	 * @return the fdNeedtime
	 */
	public String getFdNeedtime() {
		return this.fdNeedtime;
	}

	/**
	 * set the fdNeedtime - 点检需用时长
	 */
	public void setFdNeedtime(String fdNeedtime) {
		this.fdNeedtime = fdNeedtime;
	}

	/**
	 * get the fdType - 点检类型
	 * 
	 * @return the fdType
	 */
	public String getFdType() {
		return this.fdType;
	}

	/**
	 * set the fdType - 点检类型
	 */
	public void setFdType(String fdType) {
		this.fdType = fdType;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdStandredequipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStandredequipmentId")), fdStandredequipmentId));
		setFdStandardsForm(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdStandardsForm")), fdStandardsForm));
		setFdSerial(NumberUtils.toLong(StringUtils.toString(map.get("fdSerial")), fdSerial));
		setFdParts(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdParts")), fdParts));
		setFdCycletime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCycletime")), fdCycletime));
		setFdRequirements(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRequirements")), fdRequirements));
		setFdNeedtime(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdNeedtime")), fdNeedtime));
		setFdType(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdType")), fdType));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdStandredequipmentId", StringUtils.toString(fdStandredequipmentId, eiMetadata.getMeta("fdStandredequipmentId")));
		map.put("fdStandardsForm", StringUtils.toString(fdStandardsForm, eiMetadata.getMeta("fdStandardsForm")));
		map.put("fdSerial", StringUtils.toString(fdSerial, eiMetadata.getMeta("fdSerial")));
		map.put("fdParts", StringUtils.toString(fdParts, eiMetadata.getMeta("fdParts")));
		map.put("fdCycletime", StringUtils.toString(fdCycletime, eiMetadata.getMeta("fdCycletime")));
		map.put("fdRequirements", StringUtils.toString(fdRequirements, eiMetadata.getMeta("fdRequirements")));
		map.put("fdNeedtime", StringUtils.toString(fdNeedtime, eiMetadata.getMeta("fdNeedtime")));
		map.put("fdType", StringUtils.toString(fdType, eiMetadata.getMeta("fdType")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));

		return map;

	}
}